package br.mg.bhe.ftpobre.util;

import javax.swing.JOptionPane;

/**
 * 
 * @author Aureliano
 */
public final class MensagensUtil {

	public static final int WARNING = JOptionPane.WARNING_MESSAGE;
	public static final int QUESTION = JOptionPane.QUESTION_MESSAGE;
	
	private MensagensUtil() {
		super();
	}
	
	public static void showErrorMessage(String title, String message) {
		JOptionPane.showOptionDialog(
				null, message, title,
				JOptionPane.OK_OPTION, JOptionPane.ERROR_MESSAGE,
				null, new String[] {"OK"}, null);
	}

        public static void showWarningMessage(String title, String message) {
            JOptionPane.showOptionDialog(
                    null, message, title, JOptionPane.OK_OPTION,
                    JOptionPane.WARNING_MESSAGE, null,
                    new String[] {"OK"}, null);
        }
	
	public static int showConfirmationMessage(String title, String message, int messageType) {
		return JOptionPane.showOptionDialog(
				null, message, title,
				JOptionPane.YES_NO_OPTION, messageType,
				null, new String[] {"Sim", "Não"}, "Não");
	}
}